<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>setup3</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="tennisScore-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >tennisScore</th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Module&nbsp;setup3
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="setup3-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="setup3-module.html">Module setup3</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-docstring">setup3.py</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-docstring">Copyright 2014, Ty A. Lasky</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-docstring">Released under the GNU General Public License 3.0</tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-docstring">See LICENSE.txt for license information.</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-docstring">---------------------------------------------------</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"><tt class="py-docstring">Third setup dialog. Gets all remaining setup information, including players.</tt> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"><tt class="py-docstring">Exported classes:</tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"><tt class="py-docstring">Setup3 -- Third setup dialog, get player names.</tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line"><tt id="link-0" class="py-name" targets="Variable playerError.py=playerError-module.html#py,Variable scoring.py=scoring-module.html#py,Variable setup1.py=setup1-module.html#py,Variable setup2.py=setup2-module.html#py,Variable setup3.py=setup3-module.html#py,Variable tennisScore.py=tennisScore-module.html#py,Variable tennisView.py=tennisView-module.html#py,Variable util.py=util-module.html#py"><a title="playerError.py
scoring.py
setup1.py
setup2.py
setup3.py
tennisScore.py
tennisView.py
util.py" class="py-name" href="#" onclick="return doclink('link-0', 'py', 'link-0');">py</a></tt>  <tt class="py-op">=</tt> <tt class="py-number">2</tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"><tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line">        <tt class="py-keyword">import</tt> <tt class="py-name">Tkinter</tt> <tt class="py-keyword">as</tt> <tt class="py-name">tk</tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line"><tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line">        <tt class="py-keyword">import</tt> <tt class="py-name">tkinter</tt> <tt class="py-keyword">as</tt> <tt class="py-name">tk</tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line">        <tt id="link-1" class="py-name"><a title="playerError.py
scoring.py
setup1.py
setup2.py
setup3.py
tennisScore.py
tennisView.py
util.py" class="py-name" href="#" onclick="return doclink('link-1', 'py', 'link-0');">py</a></tt> <tt class="py-op">=</tt> <tt class="py-number">3</tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-2" class="py-name" targets="Module player=player-module.html"><a title="player" class="py-name" href="#" onclick="return doclink('link-2', 'player', 'link-2');">player</a></tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line"> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line"><tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-string">'../lib'</tt><tt class="py-op">)</tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-3" class="py-name" targets="Module util=util-module.html"><a title="util" class="py-name" href="#" onclick="return doclink('link-3', 'util', 'link-3');">util</a></tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line"> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line"><tt id="link-4" class="py-name" targets="Variable setup3.baseUrl=setup3-module.html#baseUrl"><a title="setup3.baseUrl" class="py-name" href="#" onclick="return doclink('link-4', 'baseUrl', 'link-4');">baseUrl</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'http://tylasky.com/res/tennisScore/'</tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line"><tt id="link-5" class="py-name" targets="Variable setup3.mensSinglesUrl=setup3-module.html#mensSinglesUrl"><a title="setup3.mensSinglesUrl" class="py-name" href="#" onclick="return doclink('link-5', 'mensSinglesUrl', 'link-5');">mensSinglesUrl</a></tt> <tt class="py-op">=</tt> <tt id="link-6" class="py-name"><a title="setup3.baseUrl" class="py-name" href="#" onclick="return doclink('link-6', 'baseUrl', 'link-4');">baseUrl</a></tt> <tt class="py-op">+</tt> <tt class="py-string">'menSingles.txt'</tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line"><tt id="link-7" class="py-name" targets="Variable setup3.womensSinglesUrl=setup3-module.html#womensSinglesUrl"><a title="setup3.womensSinglesUrl" class="py-name" href="#" onclick="return doclink('link-7', 'womensSinglesUrl', 'link-7');">womensSinglesUrl</a></tt> <tt class="py-op">=</tt> <tt id="link-8" class="py-name"><a title="setup3.baseUrl" class="py-name" href="#" onclick="return doclink('link-8', 'baseUrl', 'link-4');">baseUrl</a></tt> <tt class="py-op">+</tt> <tt class="py-string">'womenSingles.txt'</tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line"><tt id="link-9" class="py-name" targets="Variable setup3.mensDoublesUrl=setup3-module.html#mensDoublesUrl"><a title="setup3.mensDoublesUrl" class="py-name" href="#" onclick="return doclink('link-9', 'mensDoublesUrl', 'link-9');">mensDoublesUrl</a></tt> <tt class="py-op">=</tt> <tt id="link-10" class="py-name"><a title="setup3.baseUrl" class="py-name" href="#" onclick="return doclink('link-10', 'baseUrl', 'link-4');">baseUrl</a></tt> <tt class="py-op">+</tt> <tt class="py-string">'menDoubles.txt'</tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line"><tt id="link-11" class="py-name" targets="Variable setup3.womensDoublesUrl=setup3-module.html#womensDoublesUrl"><a title="setup3.womensDoublesUrl" class="py-name" href="#" onclick="return doclink('link-11', 'womensDoublesUrl', 'link-11');">womensDoublesUrl</a></tt> <tt class="py-op">=</tt> <tt id="link-12" class="py-name"><a title="setup3.baseUrl" class="py-name" href="#" onclick="return doclink('link-12', 'baseUrl', 'link-4');">baseUrl</a></tt> <tt class="py-op">+</tt> <tt class="py-string">'womenDoubles.txt'</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line"> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line"><tt id="link-13" class="py-name" targets="Variable setup3.menuWidth=setup3-module.html#menuWidth"><a title="setup3.menuWidth" class="py-name" href="#" onclick="return doclink('link-13', 'menuWidth', 'link-13');">menuWidth</a></tt> <tt class="py-op">=</tt> <tt class="py-number">29</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line"> </tt>
<a name="Setup3"></a><div id="Setup3-def"><a name="L40"></a><tt class="py-lineno"> 40</tt> <a class="py-toggle" href="#" id="Setup3-toggle" onclick="return toggle('Setup3');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="setup3.Setup3-class.html">Setup3</a><tt class="py-op">(</tt><tt class="py-base-class">tk</tt><tt class="py-op">.</tt><tt class="py-base-class">Toplevel</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Setup3-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Setup3-expanded"><a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line">        <tt class="py-docstring">"""Third setup dialog, get player names."""</tt> </tt>
<a name="Setup3.__init__"></a><div id="Setup3.__init__-def"><a name="L42"></a><tt class="py-lineno"> 42</tt> <a class="py-toggle" href="#" id="Setup3.__init__-toggle" onclick="return toggle('Setup3.__init__');">-</a><tt class="py-line">        <tt class="py-keyword">def</tt> <a class="py-def-name" href="setup3.Setup3-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">master</tt><tt class="py-op">,</tt> <tt class="py-param">mens</tt><tt class="py-op">,</tt> <tt class="py-param">doubles</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Setup3.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++++++"></div><div id="Setup3.__init__-expanded"><a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line">                <tt class="py-docstring">"""</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line"><tt class="py-docstring">                @type master: Toplevel widget</tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line"><tt class="py-docstring">                @param master: Main application window.</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line"><tt class="py-docstring">                @type mens: integer</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line"><tt class="py-docstring">                @param mens: Flag, 0 - women's match, 1 = men's match, 2 = mixed match.</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line"><tt class="py-docstring">                @type doubles: boolean</tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line"><tt class="py-docstring">                @param doubles: Flag, True if this is a doubles match.</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line"><tt class="py-docstring">                """</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line">                <tt class="py-name">tk</tt><tt class="py-op">.</tt><tt class="py-name">Toplevel</tt><tt class="py-op">.</tt><tt id="link-14" class="py-name" targets="Method observable.Observable.__init__()=observable.Observable-class.html#__init__,Method player.Player.__init__()=player.Player-class.html#__init__,Method player.Team.__init__()=player.Team-class.html#__init__,Method playerError.PlayerError.__init__()=playerError.PlayerError-class.html#__init__,Method scoring.Scoring.__init__()=scoring.Scoring-class.html#__init__,Method setup1.Setup1.__init__()=setup1.Setup1-class.html#__init__,Method setup2.Setup2.__init__()=setup2.Setup2-class.html#__init__,Method setup3.Setup3.__init__()=setup3.Setup3-class.html#__init__,Method tennisModel.Model.__init__()=tennisModel.Model-class.html#__init__,Method tennisScore.Controller.__init__()=tennisScore.Controller-class.html#__init__,Method tennisView.View.__init__()=tennisView.View-class.html#__init__"><a title="observable.Observable.__init__
player.Player.__init__
player.Team.__init__
playerError.PlayerError.__init__
scoring.Scoring.__init__
setup1.Setup1.__init__
setup2.Setup2.__init__
setup3.Setup3.__init__
tennisModel.Model.__init__
tennisScore.Controller.__init__
tennisView.View.__init__" class="py-name" href="#" onclick="return doclink('link-14', '__init__', 'link-14');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">master</tt><tt class="py-op">)</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">overrideredirect</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> <tt class="py-comment"># No window decorations, no way to close window</tt> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">geometry</tt><tt class="py-op">(</tt><tt class="py-string">'+100+100'</tt><tt class="py-op">)</tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">numberOfSets</tt> <tt class="py-op">=</tt> <tt class="py-name">tk</tt><tt class="py-op">.</tt><tt class="py-name">IntVar</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">numberOfSets</tt><tt class="py-op">.</tt><tt id="link-15" class="py-name" targets="Method observable.Observable.set()=observable.Observable-class.html#set"><a title="observable.Observable.set" class="py-name" href="#" onclick="return doclink('link-15', 'set', 'link-15');">set</a></tt><tt class="py-op">(</tt><tt class="py-number">3</tt><tt class="py-op">)</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">doubles</tt> <tt class="py-op">=</tt> <tt class="py-name">doubles</tt> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">player1String</tt> <tt class="py-op">=</tt> <tt class="py-name">tk</tt><tt class="py-op">.</tt><tt class="py-name">StringVar</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> <tt class="py-comment"># First player, team 1, string including all object properties in parseable format</tt> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">player2String</tt> <tt class="py-op">=</tt> <tt class="py-name">tk</tt><tt class="py-op">.</tt><tt class="py-name">StringVar</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> <tt class="py-comment"># First player, team 2, string including all object properties in parseable format</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">player1aString</tt> <tt class="py-op">=</tt> <tt class="py-name">tk</tt><tt class="py-op">.</tt><tt class="py-name">StringVar</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> <tt class="py-comment"># Second player, team 1, string including all object properties in parseable format</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">player2aString</tt> <tt class="py-op">=</tt> <tt class="py-name">tk</tt><tt class="py-op">.</tt><tt class="py-name">StringVar</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> <tt class="py-comment"># Second player, team 2, string including all object properties in parseable format</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">duplicateLastName</tt> <tt class="py-op">=</tt> <tt id="link-16" class="py-name"><a title="observable.Observable.set" class="py-name" href="#" onclick="return doclink('link-16', 'set', 'link-15');">set</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line"> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">doubles</tt><tt class="py-op">:</tt> <tt class="py-comment"># Doubles match</tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line">                        <tt class="py-name">tk</tt><tt class="py-op">.</tt><tt class="py-name">Radiobutton</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">text</tt><tt class="py-op">=</tt><tt class="py-string">"Two sets + tiebreak"</tt><tt class="py-op">,</tt> <tt class="py-name">padx</tt> <tt class="py-op">=</tt> <tt class="py-number">20</tt><tt class="py-op">,</tt> <tt class="py-name">variable</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">numberOfSets</tt><tt class="py-op">,</tt> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line">                                <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-number">2</tt><tt class="py-op">,</tt> <tt class="py-name">width</tt> <tt class="py-op">=</tt> <tt class="py-number">20</tt><tt class="py-op">,</tt> <tt class="py-name">anchor</tt><tt class="py-op">=</tt><tt class="py-string">'w'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">pack</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line">                        <tt class="py-name">tk</tt><tt class="py-op">.</tt><tt class="py-name">Radiobutton</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">text</tt><tt class="py-op">=</tt><tt class="py-string">"Three sets"</tt><tt class="py-op">,</tt> <tt class="py-name">padx</tt> <tt class="py-op">=</tt> <tt class="py-number">20</tt><tt class="py-op">,</tt> <tt class="py-name">variable</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">numberOfSets</tt><tt class="py-op">,</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line">                                <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-number">3</tt><tt class="py-op">,</tt> <tt class="py-name">width</tt> <tt class="py-op">=</tt> <tt class="py-number">20</tt><tt class="py-op">,</tt> <tt class="py-name">anchor</tt><tt class="py-op">=</tt><tt class="py-string">'w'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">pack</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-name">mens</tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> <tt class="py-comment"># Mens singles match</tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line">                        <tt class="py-name">tk</tt><tt class="py-op">.</tt><tt class="py-name">Radiobutton</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">text</tt><tt class="py-op">=</tt><tt class="py-string">"Three sets"</tt><tt class="py-op">,</tt> <tt class="py-name">padx</tt> <tt class="py-op">=</tt> <tt class="py-number">20</tt><tt class="py-op">,</tt> <tt class="py-name">variable</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">numberOfSets</tt><tt class="py-op">,</tt> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line">                                <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-number">3</tt><tt class="py-op">,</tt> <tt class="py-name">width</tt> <tt class="py-op">=</tt> <tt class="py-number">20</tt><tt class="py-op">,</tt> <tt class="py-name">anchor</tt><tt class="py-op">=</tt><tt class="py-string">'w'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">pack</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line">                        <tt class="py-name">tk</tt><tt class="py-op">.</tt><tt class="py-name">Radiobutton</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">text</tt><tt class="py-op">=</tt><tt class="py-string">"Five sets"</tt><tt class="py-op">,</tt> <tt class="py-name">padx</tt> <tt class="py-op">=</tt> <tt class="py-number">20</tt><tt class="py-op">,</tt> <tt class="py-name">variable</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">numberOfSets</tt><tt class="py-op">,</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line">                                <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-number">5</tt><tt class="py-op">,</tt> <tt class="py-name">width</tt> <tt class="py-op">=</tt> <tt class="py-number">20</tt><tt class="py-op">,</tt> <tt class="py-name">anchor</tt><tt class="py-op">=</tt><tt class="py-string">'w'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">pack</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line"> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">doubles</tt><tt class="py-op">:</tt> <tt class="py-comment"># Singles match</tt> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line">                        <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">mens</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-comment"># Womens singles match</tt> </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line">                                <tt class="py-comment"># Get list of womens singles players</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line">                                <tt class="py-name">plist</tt> <tt class="py-op">=</tt> <tt id="link-17" class="py-name" targets="Function setup3.readPlayers()=setup3-module.html#readPlayers"><a title="setup3.readPlayers" class="py-name" href="#" onclick="return doclink('link-17', 'readPlayers', 'link-17');">readPlayers</a></tt><tt class="py-op">(</tt><tt id="link-18" class="py-name"><a title="setup3.womensSinglesUrl" class="py-name" href="#" onclick="return doclink('link-18', 'womensSinglesUrl', 'link-7');">womensSinglesUrl</a></tt><tt class="py-op">)</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line">                        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> <tt class="py-comment"># Mens singles match</tt> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line">                                <tt class="py-comment"># Get list of mens singles players</tt> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line">                                <tt class="py-name">plist</tt> <tt class="py-op">=</tt> <tt id="link-19" class="py-name"><a title="setup3.readPlayers" class="py-name" href="#" onclick="return doclink('link-19', 'readPlayers', 'link-17');">readPlayers</a></tt><tt class="py-op">(</tt><tt id="link-20" class="py-name"><a title="setup3.mensSinglesUrl" class="py-name" href="#" onclick="return doclink('link-20', 'mensSinglesUrl', 'link-5');">mensSinglesUrl</a></tt><tt class="py-op">)</tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">                        <tt class="py-name">listToCheck</tt> <tt class="py-op">=</tt> <tt class="py-name">plist</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">player1String</tt><tt class="py-op">.</tt><tt id="link-21" class="py-name"><a title="observable.Observable.set" class="py-name" href="#" onclick="return doclink('link-21', 'set', 'link-15');">set</a></tt><tt class="py-op">(</tt><tt class="py-name">plist</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-comment"># default value</tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">player2String</tt><tt class="py-op">.</tt><tt id="link-22" class="py-name"><a title="observable.Observable.set" class="py-name" href="#" onclick="return doclink('link-22', 'set', 'link-15');">set</a></tt><tt class="py-op">(</tt><tt class="py-name">plist</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-comment"># default value</tt> </tt>
<a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line">                        <tt class="py-name">tk</tt><tt class="py-op">.</tt><tt class="py-name">Label</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt><tt class="py-name">text</tt><tt class="py-op">=</tt><tt class="py-string">'Player 1'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">pack</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line">                        <tt class="py-comment"># Get a formatted dropdown menu for player 1</tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line">                        <tt class="py-name">w1</tt> <tt class="py-op">=</tt> <tt id="link-23" class="py-name" targets="Function setup3.myDropdown()=setup3-module.html#myDropdown"><a title="setup3.myDropdown" class="py-name" href="#" onclick="return doclink('link-23', 'myDropdown', 'link-23');">myDropdown</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">player1String</tt><tt class="py-op">,</tt><tt class="py-name">plist</tt><tt class="py-op">)</tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line">                        <tt class="py-name">w1</tt><tt class="py-op">.</tt><tt class="py-name">pack</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">                        <tt class="py-name">tk</tt><tt class="py-op">.</tt><tt class="py-name">Label</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt><tt class="py-name">text</tt><tt class="py-op">=</tt><tt class="py-string">'Player 2'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">pack</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line">                        <tt class="py-comment"># Get a formatted dropdown menu for player 2</tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line">                        <tt class="py-name">w2</tt> <tt class="py-op">=</tt> <tt id="link-24" class="py-name"><a title="setup3.myDropdown" class="py-name" href="#" onclick="return doclink('link-24', 'myDropdown', 'link-23');">myDropdown</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">player2String</tt><tt class="py-op">,</tt><tt class="py-name">plist</tt><tt class="py-op">)</tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line">                        <tt class="py-name">w2</tt><tt class="py-op">.</tt><tt class="py-name">pack</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> <tt class="py-comment"># Doubles match</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">                        <tt class="py-keyword">if</tt><tt class="py-op">(</tt><tt class="py-name">mens</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">:</tt>  <tt class="py-comment"># Womens doubles match</tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line">                                <tt class="py-comment"># Get list of womens doubles players</tt> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">                                <tt class="py-name">plist1</tt> <tt class="py-op">=</tt> <tt class="py-name">plist2</tt> <tt class="py-op">=</tt> <tt id="link-25" class="py-name"><a title="setup3.readPlayers" class="py-name" href="#" onclick="return doclink('link-25', 'readPlayers', 'link-17');">readPlayers</a></tt><tt class="py-op">(</tt><tt id="link-26" class="py-name"><a title="setup3.womensDoublesUrl" class="py-name" href="#" onclick="return doclink('link-26', 'womensDoublesUrl', 'link-11');">womensDoublesUrl</a></tt><tt class="py-op">)</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">                                <tt class="py-name">listToCheck</tt> <tt class="py-op">=</tt> <tt class="py-name">plist1</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line">                        <tt class="py-keyword">elif</tt><tt class="py-op">(</tt><tt class="py-name">mens</tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-comment"># Mens doubles match</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">                                <tt class="py-comment"># Get list of mens doubles players</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line">                                <tt class="py-name">plist1</tt> <tt class="py-op">=</tt> <tt class="py-name">plist2</tt> <tt class="py-op">=</tt> <tt id="link-27" class="py-name"><a title="setup3.readPlayers" class="py-name" href="#" onclick="return doclink('link-27', 'readPlayers', 'link-17');">readPlayers</a></tt><tt class="py-op">(</tt><tt id="link-28" class="py-name"><a title="setup3.mensDoublesUrl" class="py-name" href="#" onclick="return doclink('link-28', 'mensDoublesUrl', 'link-9');">mensDoublesUrl</a></tt><tt class="py-op">)</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line">                                <tt class="py-name">listToCheck</tt> <tt class="py-op">=</tt> <tt class="py-name">plist1</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">                        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> <tt class="py-comment"># Mixed doubles match</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line">                                <tt class="py-comment"># Get list of womens doubles players</tt> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line">                                <tt class="py-name">plist1</tt> <tt class="py-op">=</tt> <tt id="link-29" class="py-name"><a title="setup3.readPlayers" class="py-name" href="#" onclick="return doclink('link-29', 'readPlayers', 'link-17');">readPlayers</a></tt><tt class="py-op">(</tt><tt id="link-30" class="py-name"><a title="setup3.womensDoublesUrl" class="py-name" href="#" onclick="return doclink('link-30', 'womensDoublesUrl', 'link-11');">womensDoublesUrl</a></tt><tt class="py-op">)</tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line">                                <tt class="py-comment"># Get list of mens doubles players</tt> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line">                                <tt class="py-name">plist2</tt> <tt class="py-op">=</tt> <tt id="link-31" class="py-name"><a title="setup3.readPlayers" class="py-name" href="#" onclick="return doclink('link-31', 'readPlayers', 'link-17');">readPlayers</a></tt><tt class="py-op">(</tt><tt id="link-32" class="py-name"><a title="setup3.mensDoublesUrl" class="py-name" href="#" onclick="return doclink('link-32', 'mensDoublesUrl', 'link-9');">mensDoublesUrl</a></tt><tt class="py-op">)</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line">                                <tt class="py-name">listToCheck</tt> <tt class="py-op">=</tt> <tt class="py-name">plist1</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line">                                <tt class="py-name">listToCheck</tt><tt class="py-op">.</tt><tt class="py-name">extend</tt><tt class="py-op">(</tt><tt class="py-name">plist2</tt><tt class="py-op">)</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">player1String</tt><tt class="py-op">.</tt><tt id="link-33" class="py-name"><a title="observable.Observable.set" class="py-name" href="#" onclick="return doclink('link-33', 'set', 'link-15');">set</a></tt><tt class="py-op">(</tt><tt class="py-name">plist1</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-comment"># default value</tt> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">player2String</tt><tt class="py-op">.</tt><tt id="link-34" class="py-name"><a title="observable.Observable.set" class="py-name" href="#" onclick="return doclink('link-34', 'set', 'link-15');">set</a></tt><tt class="py-op">(</tt><tt class="py-name">plist1</tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-comment"># default value</tt> </tt>
<a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">player1aString</tt><tt class="py-op">.</tt><tt id="link-35" class="py-name"><a title="observable.Observable.set" class="py-name" href="#" onclick="return doclink('link-35', 'set', 'link-15');">set</a></tt><tt class="py-op">(</tt><tt class="py-name">plist2</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-comment"># default value</tt> </tt>
<a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">player2aString</tt><tt class="py-op">.</tt><tt id="link-36" class="py-name"><a title="observable.Observable.set" class="py-name" href="#" onclick="return doclink('link-36', 'set', 'link-15');">set</a></tt><tt class="py-op">(</tt><tt class="py-name">plist2</tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-comment"># default value</tt> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line">                        <tt class="py-name">tk</tt><tt class="py-op">.</tt><tt class="py-name">Label</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">text</tt><tt class="py-op">=</tt><tt class="py-string">'Team 1'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">pack</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line">                        <tt class="py-comment"># Get a formatted dropdown menu for team 1, player 1</tt> </tt>
<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line">                        <tt class="py-name">w1</tt> <tt class="py-op">=</tt> <tt id="link-37" class="py-name"><a title="setup3.myDropdown" class="py-name" href="#" onclick="return doclink('link-37', 'myDropdown', 'link-23');">myDropdown</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">player1String</tt><tt class="py-op">,</tt><tt class="py-name">plist1</tt><tt class="py-op">)</tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line">                        <tt class="py-name">w1</tt><tt class="py-op">.</tt><tt class="py-name">pack</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line">                        <tt class="py-comment"># Get a formatted dropdown menu for team 1, player 2</tt> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line">                        <tt class="py-name">w1a</tt> <tt class="py-op">=</tt> <tt id="link-38" class="py-name"><a title="setup3.myDropdown" class="py-name" href="#" onclick="return doclink('link-38', 'myDropdown', 'link-23');">myDropdown</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">player1aString</tt><tt class="py-op">,</tt><tt class="py-name">plist2</tt><tt class="py-op">)</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line">                        <tt class="py-name">w1a</tt><tt class="py-op">.</tt><tt class="py-name">pack</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line">                        <tt class="py-name">tk</tt><tt class="py-op">.</tt><tt class="py-name">Label</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">text</tt><tt class="py-op">=</tt><tt class="py-string">'Team 2'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">pack</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line">                        <tt class="py-comment"># Get a formatted dropdown menu for team 2, player 1</tt> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line">                        <tt class="py-name">w2</tt> <tt class="py-op">=</tt> <tt id="link-39" class="py-name"><a title="setup3.myDropdown" class="py-name" href="#" onclick="return doclink('link-39', 'myDropdown', 'link-23');">myDropdown</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">player2String</tt><tt class="py-op">,</tt><tt class="py-name">plist1</tt><tt class="py-op">)</tt> </tt>
<a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line">                        <tt class="py-name">w2</tt><tt class="py-op">.</tt><tt class="py-name">pack</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line">                        <tt class="py-comment"># Get a formatted dropdown menu for team 2, player 2</tt> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line">                        <tt class="py-name">w2a</tt> <tt class="py-op">=</tt> <tt id="link-40" class="py-name"><a title="setup3.myDropdown" class="py-name" href="#" onclick="return doclink('link-40', 'myDropdown', 'link-23');">myDropdown</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">player2aString</tt><tt class="py-op">,</tt><tt class="py-name">plist2</tt><tt class="py-op">)</tt> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line">                        <tt class="py-name">w2a</tt><tt class="py-op">.</tt><tt class="py-name">pack</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line"> </tt>
<a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line">                <tt class="py-comment"># Find duplicate last names (used to determine need for first initial)</tt> </tt>
<a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">duplicateLastName</tt> <tt class="py-op">=</tt> <tt id="link-41" class="py-name" targets="Function setup3.duplicates()=setup3-module.html#duplicates"><a title="setup3.duplicates" class="py-name" href="#" onclick="return doclink('link-41', 'duplicates', 'link-41');">duplicates</a></tt><tt class="py-op">(</tt><tt class="py-name">listToCheck</tt><tt class="py-op">)</tt> </tt>
<a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line"> </tt>
<a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">startButton</tt> <tt class="py-op">=</tt> <tt class="py-name">tk</tt><tt class="py-op">.</tt><tt class="py-name">Button</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">text</tt><tt class="py-op">=</tt><tt class="py-string">'Start'</tt><tt class="py-op">,</tt> <tt class="py-name">width</tt><tt class="py-op">=</tt><tt class="py-number">8</tt><tt class="py-op">)</tt> </tt>
<a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">startButton</tt><tt class="py-op">.</tt><tt class="py-name">pack</tt><tt class="py-op">(</tt><tt class="py-name">side</tt><tt class="py-op">=</tt><tt class="py-string">'left'</tt><tt class="py-op">)</tt> </tt>
<a name="L132"></a><tt class="py-lineno">132</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">title</tt><tt class="py-op">(</tt><tt class="py-string">"Match Info #3"</tt><tt class="py-op">)</tt> <tt class="py-comment"># Won't have any effect, given no decorations</tt> </tt>
<a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line">                <tt id="link-42" class="py-name"><a title="util" class="py-name" href="#" onclick="return doclink('link-42', 'util', 'link-3');">util</a></tt><tt class="py-op">.</tt><tt id="link-43" class="py-name" targets="Function util.center()=util-module.html#center"><a title="util.center" class="py-name" href="#" onclick="return doclink('link-43', 'center', 'link-43');">center</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
</div><a name="L134"></a><tt class="py-lineno">134</tt>  <tt class="py-line"> </tt>
<a name="Setup3.getNumberOfSets"></a><div id="Setup3.getNumberOfSets-def"><a name="L135"></a><tt class="py-lineno">135</tt> <a class="py-toggle" href="#" id="Setup3.getNumberOfSets-toggle" onclick="return toggle('Setup3.getNumberOfSets');">-</a><tt class="py-line">        <tt class="py-keyword">def</tt> <a class="py-def-name" href="setup3.Setup3-class.html#getNumberOfSets">getNumberOfSets</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Setup3.getNumberOfSets-collapsed" style="display:none;" pad="+++" indent="++++++++++++"></div><div id="Setup3.getNumberOfSets-expanded"><a name="L136"></a><tt class="py-lineno">136</tt>  <tt class="py-line">                <tt class="py-docstring">"""</tt> </tt>
<a name="L137"></a><tt class="py-lineno">137</tt>  <tt class="py-line"><tt class="py-docstring">                Returns number of sets.</tt> </tt>
<a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line"><tt class="py-docstring">                @rtype: integer</tt> </tt>
<a name="L139"></a><tt class="py-lineno">139</tt>  <tt class="py-line"><tt class="py-docstring">                @return: Number of sets.</tt> </tt>
<a name="L140"></a><tt class="py-lineno">140</tt>  <tt class="py-line"><tt class="py-docstring">                """</tt> </tt>
<a name="L141"></a><tt class="py-lineno">141</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">numberOfSets</tt><tt class="py-op">.</tt><tt id="link-44" class="py-name" targets="Method observable.Observable.get()=observable.Observable-class.html#get"><a title="observable.Observable.get" class="py-name" href="#" onclick="return doclink('link-44', 'get', 'link-44');">get</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L142"></a><tt class="py-lineno">142</tt>  <tt class="py-line"> </tt>
<a name="Setup3.getTeamStrings"></a><div id="Setup3.getTeamStrings-def"><a name="L143"></a><tt class="py-lineno">143</tt> <a class="py-toggle" href="#" id="Setup3.getTeamStrings-toggle" onclick="return toggle('Setup3.getTeamStrings');">-</a><tt class="py-line">        <tt class="py-keyword">def</tt> <a class="py-def-name" href="setup3.Setup3-class.html#getTeamStrings">getTeamStrings</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Setup3.getTeamStrings-collapsed" style="display:none;" pad="+++" indent="++++++++++++"></div><div id="Setup3.getTeamStrings-expanded"><a name="L144"></a><tt class="py-lineno">144</tt>  <tt class="py-line">                <tt class="py-docstring">"""</tt> </tt>
<a name="L145"></a><tt class="py-lineno">145</tt>  <tt class="py-line"><tt class="py-docstring">                Returns list of strings for the players on each team.</tt> </tt>
<a name="L146"></a><tt class="py-lineno">146</tt>  <tt class="py-line"><tt class="py-docstring">                @rtype: list of strings</tt> </tt>
<a name="L147"></a><tt class="py-lineno">147</tt>  <tt class="py-line"><tt class="py-docstring">                @return: List of strings for the players on each team. Each string includes all object properties in parseable format.</tt> </tt>
<a name="L148"></a><tt class="py-lineno">148</tt>  <tt class="py-line"><tt class="py-docstring">                """</tt> </tt>
<a name="L149"></a><tt class="py-lineno">149</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">doubles</tt><tt class="py-op">:</tt> <tt class="py-comment"># Singles match</tt> </tt>
<a name="L150"></a><tt class="py-lineno">150</tt>  <tt class="py-line">                        <tt class="py-keyword">return</tt> <tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">player1String</tt><tt class="py-op">.</tt><tt id="link-45" class="py-name"><a title="observable.Observable.get" class="py-name" href="#" onclick="return doclink('link-45', 'get', 'link-44');">get</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">player2String</tt><tt class="py-op">.</tt><tt id="link-46" class="py-name"><a title="observable.Observable.get" class="py-name" href="#" onclick="return doclink('link-46', 'get', 'link-44');">get</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L151"></a><tt class="py-lineno">151</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> <tt class="py-comment"># Doubles match</tt> </tt>
<a name="L152"></a><tt class="py-lineno">152</tt>  <tt class="py-line">                        <tt class="py-keyword">return</tt> <tt class="py-op">[</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">player1String</tt><tt class="py-op">.</tt><tt id="link-47" class="py-name"><a title="observable.Observable.get" class="py-name" href="#" onclick="return doclink('link-47', 'get', 'link-44');">get</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">player1aString</tt><tt class="py-op">.</tt><tt id="link-48" class="py-name"><a title="observable.Observable.get" class="py-name" href="#" onclick="return doclink('link-48', 'get', 'link-44');">get</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L153"></a><tt class="py-lineno">153</tt>  <tt class="py-line">                                        <tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">player2String</tt><tt class="py-op">.</tt><tt id="link-49" class="py-name"><a title="observable.Observable.get" class="py-name" href="#" onclick="return doclink('link-49', 'get', 'link-44');">get</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">player2aString</tt><tt class="py-op">.</tt><tt id="link-50" class="py-name"><a title="observable.Observable.get" class="py-name" href="#" onclick="return doclink('link-50', 'get', 'link-44');">get</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">]</tt> </tt>
</div><a name="L154"></a><tt class="py-lineno">154</tt>  <tt class="py-line"> </tt>
<a name="Setup3.loadPlayerLists"></a><div id="Setup3.loadPlayerLists-def"><a name="L155"></a><tt class="py-lineno">155</tt> <a class="py-toggle" href="#" id="Setup3.loadPlayerLists-toggle" onclick="return toggle('Setup3.loadPlayerLists');">-</a><tt class="py-line">        <tt class="py-keyword">def</tt> <a class="py-def-name" href="setup3.Setup3-class.html#loadPlayerLists">loadPlayerLists</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Setup3.loadPlayerLists-collapsed" style="display:none;" pad="+++" indent="++++++++++++"></div><div id="Setup3.loadPlayerLists-expanded"><a name="L156"></a><tt class="py-lineno">156</tt>  <tt class="py-line">                <tt class="py-docstring">"""</tt> </tt>
<a name="L157"></a><tt class="py-lineno">157</tt>  <tt class="py-line"><tt class="py-docstring">                Loads all four player lists.</tt> </tt>
<a name="L158"></a><tt class="py-lineno">158</tt>  <tt class="py-line"><tt class="py-docstring">                NOTE: Not used, loading player lists only when needed.</tt> </tt>
<a name="L159"></a><tt class="py-lineno">159</tt>  <tt class="py-line"><tt class="py-docstring">                """</tt> </tt>
<a name="L160"></a><tt class="py-lineno">160</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">menSinglesPlayers</tt> <tt class="py-op">=</tt> <tt id="link-51" class="py-name"><a title="setup3.readPlayers" class="py-name" href="#" onclick="return doclink('link-51', 'readPlayers', 'link-17');">readPlayers</a></tt><tt class="py-op">(</tt><tt id="link-52" class="py-name"><a title="setup3.mensSinglesUrl" class="py-name" href="#" onclick="return doclink('link-52', 'mensSinglesUrl', 'link-5');">mensSinglesUrl</a></tt><tt class="py-op">)</tt> </tt>
<a name="L161"></a><tt class="py-lineno">161</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">womenSinglesPlayers</tt> <tt class="py-op">=</tt> <tt id="link-53" class="py-name"><a title="setup3.readPlayers" class="py-name" href="#" onclick="return doclink('link-53', 'readPlayers', 'link-17');">readPlayers</a></tt><tt class="py-op">(</tt><tt id="link-54" class="py-name"><a title="setup3.womensSinglesUrl" class="py-name" href="#" onclick="return doclink('link-54', 'womensSinglesUrl', 'link-7');">womensSinglesUrl</a></tt><tt class="py-op">)</tt> </tt>
<a name="L162"></a><tt class="py-lineno">162</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">menDoublesPlayers</tt> <tt class="py-op">=</tt> <tt id="link-55" class="py-name"><a title="setup3.readPlayers" class="py-name" href="#" onclick="return doclink('link-55', 'readPlayers', 'link-17');">readPlayers</a></tt><tt class="py-op">(</tt><tt id="link-56" class="py-name"><a title="setup3.mensDoublesUrl" class="py-name" href="#" onclick="return doclink('link-56', 'mensDoublesUrl', 'link-9');">mensDoublesUrl</a></tt><tt class="py-op">)</tt> </tt>
<a name="L163"></a><tt class="py-lineno">163</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">womenDoublesPlayers</tt> <tt class="py-op">=</tt> <tt id="link-57" class="py-name"><a title="setup3.readPlayers" class="py-name" href="#" onclick="return doclink('link-57', 'readPlayers', 'link-17');">readPlayers</a></tt><tt class="py-op">(</tt><tt id="link-58" class="py-name"><a title="setup3.womensDoublesUrl" class="py-name" href="#" onclick="return doclink('link-58', 'womensDoublesUrl', 'link-11');">womensDoublesUrl</a></tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L164"></a><tt class="py-lineno">164</tt>  <tt class="py-line"> </tt>
<a name="myDropdown"></a><div id="myDropdown-def"><a name="L165"></a><tt class="py-lineno">165</tt> <a class="py-toggle" href="#" id="myDropdown-toggle" onclick="return toggle('myDropdown');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="setup3-module.html#myDropdown">myDropdown</a><tt class="py-op">(</tt><tt class="py-param">master</tt><tt class="py-op">,</tt> <tt class="py-param">var</tt><tt class="py-op">,</tt> <tt class="py-param">optList</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="myDropdown-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="myDropdown-expanded"><a name="L166"></a><tt class="py-lineno">166</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L167"></a><tt class="py-lineno">167</tt>  <tt class="py-line"><tt class="py-docstring">        Provides a stylized option menu / dropdown list.</tt> </tt>
<a name="L168"></a><tt class="py-lineno">168</tt>  <tt class="py-line"><tt class="py-docstring">        @type master: Toplevel widget</tt> </tt>
<a name="L169"></a><tt class="py-lineno">169</tt>  <tt class="py-line"><tt class="py-docstring">        @param master: Window to host the menu.</tt> </tt>
<a name="L170"></a><tt class="py-lineno">170</tt>  <tt class="py-line"><tt class="py-docstring">        @type var: Tkinter variable</tt> </tt>
<a name="L171"></a><tt class="py-lineno">171</tt>  <tt class="py-line"><tt class="py-docstring">        @param var: The variable to be set by the option menu.</tt> </tt>
<a name="L172"></a><tt class="py-lineno">172</tt>  <tt class="py-line"><tt class="py-docstring">        @type optList: list of strings</tt> </tt>
<a name="L173"></a><tt class="py-lineno">173</tt>  <tt class="py-line"><tt class="py-docstring">        @param optList: List of strings for the option menu.</tt> </tt>
<a name="L174"></a><tt class="py-lineno">174</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype: OptionMenu</tt> </tt>
<a name="L175"></a><tt class="py-lineno">175</tt>  <tt class="py-line"><tt class="py-docstring">        @return: The constructed option menu / dropdown list.</tt> </tt>
<a name="L176"></a><tt class="py-lineno">176</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L177"></a><tt class="py-lineno">177</tt>  <tt class="py-line">        <tt class="py-name">w</tt> <tt class="py-op">=</tt> <tt class="py-name">tk</tt><tt class="py-op">.</tt><tt class="py-name">OptionMenu</tt><tt class="py-op">(</tt><tt class="py-name">master</tt><tt class="py-op">,</tt> <tt class="py-name">var</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-name">optList</tt><tt class="py-op">)</tt> </tt>
<a name="L178"></a><tt class="py-lineno">178</tt>  <tt class="py-line">        <tt class="py-name">w</tt><tt class="py-op">.</tt><tt class="py-name">config</tt><tt class="py-op">(</tt><tt class="py-name">bg</tt><tt class="py-op">=</tt><tt class="py-string">'black'</tt><tt class="py-op">,</tt><tt class="py-name">fg</tt><tt class="py-op">=</tt><tt class="py-string">'white'</tt><tt class="py-op">,</tt> <tt class="py-name">width</tt><tt class="py-op">=</tt><tt id="link-59" class="py-name"><a title="setup3.menuWidth" class="py-name" href="#" onclick="return doclink('link-59', 'menuWidth', 'link-13');">menuWidth</a></tt><tt class="py-op">)</tt> </tt>
<a name="L179"></a><tt class="py-lineno">179</tt>  <tt class="py-line">        <tt class="py-name">w</tt><tt class="py-op">[</tt><tt class="py-string">'menu'</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">config</tt><tt class="py-op">(</tt><tt class="py-name">bg</tt><tt class="py-op">=</tt><tt class="py-string">'black'</tt><tt class="py-op">,</tt><tt class="py-name">fg</tt><tt class="py-op">=</tt><tt class="py-string">'white'</tt><tt class="py-op">)</tt> </tt>
<a name="L180"></a><tt class="py-lineno">180</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">w</tt> </tt>
</div><a name="L181"></a><tt class="py-lineno">181</tt>  <tt class="py-line"> </tt>
<a name="readPlayers"></a><div id="readPlayers-def"><a name="L182"></a><tt class="py-lineno">182</tt> <a class="py-toggle" href="#" id="readPlayers-toggle" onclick="return toggle('readPlayers');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="setup3-module.html#readPlayers">readPlayers</a><tt class="py-op">(</tt><tt class="py-param">url</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="readPlayers-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="readPlayers-expanded"><a name="L183"></a><tt class="py-lineno">183</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L184"></a><tt class="py-lineno">184</tt>  <tt class="py-line"><tt class="py-docstring">        Reads a player list from the given URL.</tt> </tt>
<a name="L185"></a><tt class="py-lineno">185</tt>  <tt class="py-line"><tt class="py-docstring">        @type url: strings</tt> </tt>
<a name="L186"></a><tt class="py-lineno">186</tt>  <tt class="py-line"><tt class="py-docstring">        @param url: The URL that holds the player list information.</tt> </tt>
<a name="L187"></a><tt class="py-lineno">187</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype: list of strings</tt> </tt>
<a name="L188"></a><tt class="py-lineno">188</tt>  <tt class="py-line"><tt class="py-docstring">        @return: List of players in a special format that can be parsed into a player object.</tt> </tt>
<a name="L189"></a><tt class="py-lineno">189</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L190"></a><tt class="py-lineno">190</tt>  <tt class="py-line">        <tt class="py-comment"># Load the player list from URL into a string</tt> </tt>
<a name="L191"></a><tt class="py-lineno">191</tt>  <tt class="py-line">        <tt class="py-name">txt</tt> <tt class="py-op">=</tt> <tt id="link-60" class="py-name"><a title="util" class="py-name" href="#" onclick="return doclink('link-60', 'util', 'link-3');">util</a></tt><tt class="py-op">.</tt><tt id="link-61" class="py-name" targets="Function util.getUrlAsString()=util-module.html#getUrlAsString"><a title="util.getUrlAsString" class="py-name" href="#" onclick="return doclink('link-61', 'getUrlAsString', 'link-61');">getUrlAsString</a></tt><tt class="py-op">(</tt><tt class="py-name">url</tt><tt class="py-op">)</tt> </tt>
<a name="L192"></a><tt class="py-lineno">192</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">txt</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L193"></a><tt class="py-lineno">193</tt>  <tt class="py-line">                <tt class="py-name">players</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L194"></a><tt class="py-lineno">194</tt>  <tt class="py-line">                <tt class="py-keyword">for</tt> <tt class="py-name">line</tt> <tt class="py-keyword">in</tt> <tt id="link-62" class="py-name"><a title="util" class="py-name" href="#" onclick="return doclink('link-62', 'util', 'link-3');">util</a></tt><tt class="py-op">.</tt><tt id="link-63" class="py-name" targets="Function util.lineIter()=util-module.html#lineIter"><a title="util.lineIter" class="py-name" href="#" onclick="return doclink('link-63', 'lineIter', 'link-63');">lineIter</a></tt><tt class="py-op">(</tt><tt class="py-name">txt</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-comment"># Decode the player list from known format of tennischannel.com files</tt> </tt>
<a name="L195"></a><tt class="py-lineno">195</tt>  <tt class="py-line">                        <tt class="py-name">line</tt> <tt class="py-op">=</tt> <tt id="link-64" class="py-name"><a title="util" class="py-name" href="#" onclick="return doclink('link-64', 'util', 'link-3');">util</a></tt><tt class="py-op">.</tt><tt id="link-65" class="py-name" targets="Function util.decode()=util-module.html#decode"><a title="util.decode" class="py-name" href="#" onclick="return doclink('link-65', 'decode', 'link-65');">decode</a></tt><tt class="py-op">(</tt><tt class="py-name">line</tt><tt class="py-op">)</tt> </tt>
<a name="L196"></a><tt class="py-lineno">196</tt>  <tt class="py-line">                        <tt class="py-name">strings</tt> <tt class="py-op">=</tt> <tt class="py-name">line</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">"\t"</tt><tt class="py-op">)</tt> </tt>
<a name="L197"></a><tt class="py-lineno">197</tt>  <tt class="py-line">                        <tt class="py-name">rank</tt> <tt class="py-op">=</tt> <tt id="link-66" class="py-name" targets="Class int=int-class.html"><a title="int" class="py-name" href="#" onclick="return doclink('link-66', 'int', 'link-66');">int</a></tt><tt class="py-op">(</tt><tt class="py-name">strings</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L198"></a><tt class="py-lineno">198</tt>  <tt class="py-line">                        <tt class="py-name">strings</tt> <tt class="py-op">=</tt> <tt class="py-name">strings</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">","</tt><tt class="py-op">)</tt> </tt>
<a name="L199"></a><tt class="py-lineno">199</tt>  <tt class="py-line">                        <tt class="py-name">lastName</tt> <tt class="py-op">=</tt> <tt class="py-name">strings</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L200"></a><tt class="py-lineno">200</tt>  <tt class="py-line">                        <tt class="py-name">strings</tt> <tt class="py-op">=</tt> <tt class="py-name">strings</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">"("</tt><tt class="py-op">)</tt> </tt>
<a name="L201"></a><tt class="py-lineno">201</tt>  <tt class="py-line">                        <tt class="py-name">firstName</tt> <tt class="py-op">=</tt> <tt class="py-name">strings</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">strip</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L202"></a><tt class="py-lineno">202</tt>  <tt class="py-line">                        <tt class="py-name">country</tt> <tt class="py-op">=</tt> <tt class="py-name">strings</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">:</tt><tt class="py-number">3</tt><tt class="py-op">]</tt> </tt>
<a name="L203"></a><tt class="py-lineno">203</tt>  <tt class="py-line">                        <tt class="py-comment"># Creating list of easily parsed strings representative of player objects.</tt> </tt>
<a name="L204"></a><tt class="py-lineno">204</tt>  <tt class="py-line">                        <tt class="py-comment"># These strings are "pretty" enough to use in dropdown list.</tt> </tt>
<a name="L205"></a><tt class="py-lineno">205</tt>  <tt class="py-line">                        <tt class="py-name">players</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-string">'{}. {}, {} ({})'</tt><tt class="py-op">.</tt><tt class="py-name">format</tt><tt class="py-op">(</tt><tt class="py-name">rank</tt><tt class="py-op">,</tt> <tt class="py-name">lastName</tt><tt class="py-op">,</tt> <tt class="py-name">firstName</tt><tt class="py-op">,</tt> <tt class="py-name">country</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L206"></a><tt class="py-lineno">206</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L207"></a><tt class="py-lineno">207</tt>  <tt class="py-line">                <tt class="py-keyword">print</tt><tt class="py-op">(</tt><tt class="py-string">"readPlayers: Couldn't open {}, exiting."</tt><tt class="py-op">.</tt><tt class="py-name">format</tt><tt class="py-op">(</tt><tt class="py-name">url</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L208"></a><tt class="py-lineno">208</tt>  <tt class="py-line">                <tt class="py-comment"># Maybe something better to do than exit. Consider in future version.</tt> </tt>
<a name="L209"></a><tt class="py-lineno">209</tt>  <tt class="py-line">                <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt id="link-67" class="py-name" targets="Method tennisView.View.exit()=tennisView.View-class.html#exit"><a title="tennisView.View.exit" class="py-name" href="#" onclick="return doclink('link-67', 'exit', 'link-67');">exit</a></tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L210"></a><tt class="py-lineno">210</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">players</tt> </tt>
</div><a name="L211"></a><tt class="py-lineno">211</tt>  <tt class="py-line"> </tt>
<a name="duplicates"></a><div id="duplicates-def"><a name="L212"></a><tt class="py-lineno">212</tt> <a class="py-toggle" href="#" id="duplicates-toggle" onclick="return toggle('duplicates');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="setup3-module.html#duplicates">duplicates</a><tt class="py-op">(</tt><tt class="py-param">playerList</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="duplicates-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="duplicates-expanded"><a name="L213"></a><tt class="py-lineno">213</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L214"></a><tt class="py-lineno">214</tt>  <tt class="py-line"><tt class="py-docstring">        Checks player list to see if there are any duplicate last names.</tt> </tt>
<a name="L215"></a><tt class="py-lineno">215</tt>  <tt class="py-line"><tt class="py-docstring">        @type playerList: list of strings</tt> </tt>
<a name="L216"></a><tt class="py-lineno">216</tt>  <tt class="py-line"><tt class="py-docstring">        @param playerList: List of players, each as string formatted as returned by readPlayers.</tt> </tt>
<a name="L217"></a><tt class="py-lineno">217</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype: set</tt> </tt>
<a name="L218"></a><tt class="py-lineno">218</tt>  <tt class="py-line"><tt class="py-docstring">        @return: Set of last names that appear more than once in playerList.</tt> </tt>
<a name="L219"></a><tt class="py-lineno">219</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L220"></a><tt class="py-lineno">220</tt>  <tt class="py-line">        <tt class="py-name">lastNames</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L221"></a><tt class="py-lineno">221</tt>  <tt class="py-line">        <tt class="py-name">dups</tt> <tt class="py-op">=</tt> <tt id="link-68" class="py-name"><a title="observable.Observable.set" class="py-name" href="#" onclick="return doclink('link-68', 'set', 'link-15');">set</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L222"></a><tt class="py-lineno">222</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">pString</tt> <tt class="py-keyword">in</tt> <tt class="py-name">playerList</tt><tt class="py-op">:</tt> </tt>
<a name="L223"></a><tt class="py-lineno">223</tt>  <tt class="py-line">                <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt class="py-name">pString</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">)</tt> <tt class="py-comment"># strip off rank</tt> </tt>
<a name="L224"></a><tt class="py-lineno">224</tt>  <tt class="py-line">                <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt class="py-name">s</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">','</tt><tt class="py-op">)</tt> </tt>
<a name="L225"></a><tt class="py-lineno">225</tt>  <tt class="py-line">                <tt class="py-name">last</tt> <tt class="py-op">=</tt> <tt class="py-name">s</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">strip</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L226"></a><tt class="py-lineno">226</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">last</tt> <tt class="py-keyword">in</tt> <tt class="py-name">lastNames</tt><tt class="py-op">:</tt> </tt>
<a name="L227"></a><tt class="py-lineno">227</tt>  <tt class="py-line">                        <tt class="py-name">dups</tt><tt class="py-op">.</tt><tt class="py-name">add</tt><tt class="py-op">(</tt><tt class="py-name">last</tt><tt class="py-op">)</tt> </tt>
<a name="L228"></a><tt class="py-lineno">228</tt>  <tt class="py-line">                <tt class="py-name">lastNames</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">last</tt><tt class="py-op">)</tt> </tt>
<a name="L229"></a><tt class="py-lineno">229</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">dups</tt> </tt>
</div><a name="L230"></a><tt class="py-lineno">230</tt>  <tt class="py-line"> </tt>
<a name="L231"></a><tt class="py-lineno">231</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt class="py-name">__name__</tt> <tt class="py-op">==</tt> <tt class="py-string">'__main__'</tt><tt class="py-op">:</tt> </tt>
<a name="L232"></a><tt class="py-lineno">232</tt>  <tt class="py-line">        <tt class="py-name">p</tt> <tt class="py-op">=</tt> <tt id="link-69" class="py-name"><a title="setup3.readPlayers" class="py-name" href="#" onclick="return doclink('link-69', 'readPlayers', 'link-17');">readPlayers</a></tt><tt class="py-op">(</tt><tt class="py-name">womensSinglesFile</tt><tt class="py-op">)</tt> </tt>
<a name="L233"></a><tt class="py-lineno">233</tt>  <tt class="py-line">        <tt class="py-keyword">print</tt><tt class="py-op">(</tt><tt class="py-name">p</tt><tt class="py-op">)</tt> </tt>
<a name="L234"></a><tt class="py-lineno">234</tt>  <tt class="py-line">        <tt class="py-name">p</tt> <tt class="py-op">=</tt> <tt id="link-70" class="py-name"><a title="setup3.readPlayers" class="py-name" href="#" onclick="return doclink('link-70', 'readPlayers', 'link-17');">readPlayers</a></tt><tt class="py-op">(</tt><tt class="py-name">mensSinglesFile</tt><tt class="py-op">)</tt> </tt>
<a name="L235"></a><tt class="py-lineno">235</tt>  <tt class="py-line">        <tt class="py-keyword">print</tt><tt class="py-op">(</tt><tt class="py-name">p</tt><tt class="py-op">)</tt> </tt>
<a name="L236"></a><tt class="py-lineno">236</tt>  <tt class="py-line">        <tt class="py-name">p</tt> <tt class="py-op">=</tt> <tt id="link-71" class="py-name"><a title="setup3.readPlayers" class="py-name" href="#" onclick="return doclink('link-71', 'readPlayers', 'link-17');">readPlayers</a></tt><tt class="py-op">(</tt><tt class="py-name">womensDoublesFile</tt><tt class="py-op">)</tt> </tt>
<a name="L237"></a><tt class="py-lineno">237</tt>  <tt class="py-line">        <tt class="py-keyword">print</tt><tt class="py-op">(</tt><tt class="py-name">p</tt><tt class="py-op">)</tt> </tt>
<a name="L238"></a><tt class="py-lineno">238</tt>  <tt class="py-line">        <tt class="py-name">p</tt> <tt class="py-op">=</tt> <tt id="link-72" class="py-name"><a title="setup3.readPlayers" class="py-name" href="#" onclick="return doclink('link-72', 'readPlayers', 'link-17');">readPlayers</a></tt><tt class="py-op">(</tt><tt class="py-name">mensDoublesFile</tt><tt class="py-op">)</tt> </tt>
<a name="L239"></a><tt class="py-lineno">239</tt>  <tt class="py-line">        <tt class="py-keyword">print</tt><tt class="py-op">(</tt><tt class="py-name">p</tt><tt class="py-op">)</tt> </tt>
<a name="L240"></a><tt class="py-lineno">240</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="tennisScore-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >tennisScore</th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Sun Nov  9 17:23:06 2014
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
